<?php

namespace App\Model;

use Illuminate\Database\Eloquent\Model;

class OAWork extends Model
{
    protected $table = 'work';

    const WORK_PROJECT_LX = 1;//立项
    const WORK_PROJECT_YS = 3;//预算
    const WORK_PROJECT_JS = 3;//结算
    const WORK_FINANCE_CLV = 4;//差旅
    const WORK_FINANCE_CM = 5;//采买
    const WORK_FINANCE_BX = 6;//报销
    const WORK_FINANCE_FK = 7;//付款
    const WORK_FINANCE_JK = 8;//借款
    const WORK_FINANCE_YJ = 9;//押金
    const WORK_FINANCE_YJ_RETURN = 10;//押金返还
    const WORK_FINANCE_LK = 11;//临款
    const WORK_FINANCE_FP = 12;//发票

    //流程节点
    public function work_node()
    {
        return $this->hasMany('App\Model\OAWorkNode','work_id');
    }

    //节点
    public function work_link()
    {
        return $this->hasMany('App\Model\OAWorkLink','work_id');
    }




}
